#if !defined(__APP_MQTT_H)
#define __APP_MQTT_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MQTTClient.h"
#include "log/log.h"

#define ADDRESS "ws://192.168.21.59:1883"
#define CLIENTID "b253ba38-daf6-4b37-984f-5d8fdc6a1cfa"
#define TOPIC_PULL "remote_to_gateway"
#define TOPIC_PUSH "gateway_to_remote"
#define PAYLOAD "Hello World!"
#define QOS 1
#define TIMEOUT 10000L

// 定义一个函数用于接收回调函数
typedef int (*rece_cb)(char *json_str);

int app_mqtt_init(rece_cb call_back);

int app_mqtt_send(char *json_str);

#endif // __APP_MQTT_H
